package dao;

import java.sql.ResultSet;
import java.sql.SQLException;

public class UnrentDao {
	
	public UnrentDao(){
	}
	public void  updatRoom(String roomNum){
		ConnectDao connectDao = new ConnectDao();
		String sql = "UPDATE room SET status = '0' WHERE roomNum = '"+roomNum+"'";
		try{
			connectDao.stat.executeUpdate(sql);
			connectDao.closeConnect();
		}catch(SQLException e){
			e.printStackTrace();
			connectDao.closeConnect();
		}
	}
	
	
	public void  updatLives(String roomNum){
		ConnectDao connectDao = new ConnectDao();
		String sql = "UPDATE lives SET status = '0' WHERE roomNum = '"+roomNum+"'";
		try{
			connectDao.stat.executeUpdate(sql);
			connectDao.closeConnect();
		}catch(SQLException e){
			e.printStackTrace();
			connectDao.closeConnect();
		}
	}
}
